From: Luca Boccassi Date: Sun, 8 Mar 2026 14:30:52 +0000 (+0000) Subject: machined: reject invalid class types when registering machines X-Git-Tag: archive/raspbian/247.3-7+rpi1+deb11u8^2~8 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/%22mailto:kde%40ewsoftware.de/%22style.css//%22node%24level1.%24level2.html/%22/%22http:/www.example.com/%22mailto:kde%40ewsoftware.de/%22style.css/%22node%24level1.%24level2.html/%22?a=commitdiff_plain;h=e0dee9ba508e29dc77a18c022c271ab15b9f330b;p=systemd.git machined: reject invalid class types when registering machines Follow-up for fbe550738d03b178bb004a1390e74115e904118a (cherry picked from commit 6df5f80bd374be1b45c52d740e88f0236da922c7) (cherry picked from commit 497d0172416cbb5b70f96b95399d041407c223bd) (cherry picked from commit 749e2eaf7086c91598cf7043a31919854b1c2dfe) Origin: backport, https://github.com/systemd/systemd/commit/6941d92dc299667036cbe264435971cec59ebc76 Gbp-Pq: Name CVE-2026-4105.patch --- diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c index 494813e3..1a1521f6 100644 --- a/src/machine/machined-dbus.c +++ b/src/machine/machined-dbus.c @@ -275,7 +275,7 @@ static int method_create_or_register_machine(Manager *manager, sd_bus_message *m c = _MACHINE_CLASS_INVALID; else { c = machine_class_from_string(class); - if (c < 0) + if (c < 0 || !IN_SET(c, MACHINE_CONTAINER, MACHINE_VM)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid machine class parameter"); }